'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);

  // 积分商城列表
  router.get('/goodsList', controller.goods.index);
  router.post('/addList', controller.goods.create); // 创建
  router.delete('/delList/:id', controller.goods.destroy); // 删除
  router.put('/editListApi', controller.goods.update);
  // 积分商城轮播
  router.get('/banners', controller.banners.index);
  router.post('/addBannerList', controller.banners.create);
  router.put('/editBannerList', controller.banners.update);
  router.delete('/delBannerList/:id', controller.banners.destroy);
  router.get('/getBanner/:id', controller.banners.show); // 查找
  // 积分商城分类
  router.get('/getCate', controller.category.index);
  router.post('/addCate', controller.category.create);
  router.delete('/delCate/:id', controller.category.destroy);
  router.get('/findCate/:id', controller.category.show);
  router.put('/editCate', controller.category.update);
  // 积分商城状态
  router.get('/goodStatus', controller.goodstatus.index);
  router.get('/getStatusDetail', controller.statedetail.index);
  router.get('/findStatus/:id', controller.statedetail.show);
  router.put('/editStatus', controller.statedetail.update);

  // 权限列表
  router.get('/getXstoreAdmin', controller.jurisdiction.index);
  router.post('/getXaddstoreAdmin', controller.jurisdiction.create);
  router.delete('/getXdeletestoreAdmin/:id', controller.jurisdiction.destroy);
  router.put('/getXmodifystoreAdmin/:id', controller.jurisdiction.update);

  // 权限列表——管理员列表
  router.get('/getXAdminAdmin', controller.xadmin.index);
  router.delete('/getXdeleteAdminAdmin/:id', controller.xadmin.destroy);
  router.put('/getXmodifyAdminAdmin/:id', controller.xadmin.update);
  router.post('/getXaddAdminAdmin', controller.xadmin.create);
  // 提现审核
  router.get('/getXwithdrawalAudit', controller.xwithdraw.index);
  router.put('/getXmodifywithdrawalAudit/:id', controller.xwithdraw.update);
  // 角色管理
  router.get('/getXroleAdmin', controller.xroleplay.index);
  router.delete('/getXdeleteroleAdmin/:id', controller.xroleplay.destroy);
  router.post('/getXaddroleAdmin', controller.xroleplay.create);
  router.get('/getXjurisdiction', controller.xroleplay.index);
  // 评价列表
  router.get('/evaluate', controller.evaluate.index);
  router.delete('/evaldelList/:id', controller.evaluate.destroy);
  router.get('/getLookUpList', controller.evaluate.index);
  router.put('/getXmodifyVerify/:id', controller.evaluate.update);
  router.get('/getVirtualList', controller.evaluate.index);
  router.post('/getXaddEvalList', controller.evaluate.create);
  router.post('/api/Xloadimg', controller.xslUpload.updatepuSubPic); // 图片上传
  router.delete('/getXdeleteEvalList/:id', controller.evaluate.destroy);
  router.get('/findVerifyList/:id', controller.evaluate.show); // 查找
  router.get('/getXResponse', controller.evaluate.index);
  // 信息管理
  // 意见反馈
  router.get('/getXmessageList', controller.xmessage.index);
  router.delete('/messageXdelList/:id', controller.xmessage.destroy);
  // 合作申请
  router.get('/getXcooperList', controller.xcooperation.index);
  router.delete('/cooperXdelList/:id', controller.xcooperation.destroy);
  // 用药问答
  router.get('/getXmedicineList', controller.xmedicine.index);
  router.delete('/medicineXdelList/:id', controller.xmedicine.destroy);
  router.get('/getXmedicineAnswer/:id', controller.xmedicine.show);

  router.post('/api/user/login', controller.user.login); // 登录
  router.post('/api/loadUp', controller.jsbUpload.updatepuSubPic);

  router.get('/api/Carousel', controller.carousel.index); // 获取主页底部表格
  router.delete('/api/carousel/:id', controller.carousel.destroy); // 删除底部表格指定数据
  router.post('/api/carousels', controller.carousel.create); // 添加轮播图图片
  router.get('/api/navigation', controller.navigation.index); // 获取导航按钮底部表格
  router.get('/api/navigations/:lin', controller.navigation.indexs); // 获取选择的图片


  router.put('/api/navicon/:id', controller.navigation.update); // 更新选取的图标
  router.get('/api/Notice', controller.user.indexs); // 获取公告
  router.put('/api/Notices/:id', controller.user.updates); // 更新公告
  router.get('/api/upmydata', controller.upmydata.index); // 获取导航按钮底部表格
  router.put('/api/upmydatas/:id', controller.upmydata.update); // 更新选取的图标


  router.get('/api/jadminstrion', controller.jadminstrion.index); // 查找品牌管理数据
  router.post('/api/jadminstrions', controller.jadminstrion.create); // 创建品牌管理数据
  router.put('/api/jadminstriona/:id', controller.jadminstrion.update); // 更新品牌管理数据
  router.delete('/api/jadminstrionw/:id', controller.jadminstrion.destroy); // 删除品牌管理的数据

  router.post('/api/lwjlogin', controller.loginjwt.login); // 登陆带token   getShopList
  router.get('/api/lwjgetShopList', controller.getShopList.index); // 查找
  router.delete('/api/lwjgetShopList/:id', controller.getShopList.destroy); // 删除数据
  router.put('/api/lwjputshoplist/:id', controller.getShopList.update); // 更新
  router.post('/api/addlist', controller.lwjadd.create); // 增加list的数据
  router.post('/api/loadimg', controller.lwzUpload.updatepuSubPic); // 图片上传
  router.post('/api/lwjloadimg', controller.lwzUpload.updatepuSubPic2); // 图片上传
  router.get('/api/lwjget', controller.indexOne.index); // 查找index
  router.delete('/api/lwjindexdel/:id', controller.indexOne.destroy); // 删除index
  router.put('/api/lwjindexput/:id', controller.indexOne.update); // 更新index
  router.post('/api/lwjindexcrete', controller.indexOne.create); // 增加index
  router.put('/api/updatashow/:id', controller.lwjadd.update); // 更新
  router.get('/api/lwjupdata/:id', controller.lwjadd.show); // 查找
  router.get('/api/commodiygroup/Get', controller.commodiygroup.index); // 查找
  router.delete('/api/commodiygroup/del/:id', controller.commodiygroup.destroy); // 删除
  router.get('/api/group_get', controller.group.index); // 查找
  router.put('/api/updatagroup_put/:id', controller.group.update); // 更新
  router.post('/api/commodiygroup_create', controller.commodiygroup.create); // 增加
  router.get('/api/commodiygroup_updata/:id', controller.commodiygroup.show); // 查找
  router.put('/api/commodiygroup_put/:id', controller.commodiygroup.update); // 更新
  router.put('/api/commodiygroup_put_one/:id', controller.commodiygroup.commodiygroup_put); // 更新
  router.get('/api/brand_get', controller.brand.index); // 查找品牌数据
  router.delete('/api/brand/del/:id', controller.brand.destroy); // 删除
  router.post('/api/brand_create', controller.brand.create); // 创建品牌
  router.get('/api/brand_gitid/:id', controller.brand.show); // 查找
  router.put('/api/brand_put/:id', controller.brand.update); // 更新
  router.delete('/api/deletemultiple/:id', controller.getShopList.multipleDestroys); // 多选删除
  router.delete('/api/commodiygroup_del/:id', controller.commodiygroup.multipleDestroys); // 多选删除

  // router.get('/api/getWYLuser', controller.user.index);

  router.get('/api/getWYLuser', controller.whjnamelist.index);
  router.get('/api/getwhjRecharge', controller.whjRecharge.index);
  router.get('/api/getwhjdis', controller.whjdis.index);
  router.get('/api/getwhjDrug', controller.whjdrug.index);
  router.put('/api/upgetwhjDrug/:id', controller.whjdrug.update);
  router.post('/api/addwhjdis', controller.whjdis.create);
  router.get('/api/getpre', controller.whjpre.index);
  router.post('/api/addpre', controller.whjpre.create);
  router.put('/api/upre/:id', controller.whjpre.update);
  router.delete('/api/delpre/:id', controller.whjpre.destroy); // 删除
  router.get('/api/getwhjmember', controller.whjmember.index);
  router.get('/api/sewhjmember/:id', controller.whjmember.show);// 查找
  router.get('/api/getbiao', controller.whjbiao.index);
  router.post('/api/addbiao', controller.whjbiao.create);
  router.put('/api/upwhjbiao/:id', controller.whjbiao.update);
  router.delete('/api/delbiao/:id', controller.whjbiao.destroy); // 删除
  router.get('/api/getgrade', controller.whjgrade.index);
  router.post('/api/addgrade', controller.whjgrade.create);
  router.get('/api/sehgrade/:id', controller.whjgrade.show);// 查找
  router.put('/api/upgrade/:id', controller.whjgrade.update);
  router.get('/api/getgrouping', controller.whjgrouping.index);
  router.post('/api/addgrouping', controller.whjgrouping.create);
  router.delete('/api/delgrouping/:id', controller.whjgrouping.destroy); // 删除
  router.get('/api/getgrouping', controller.whjgrouping.index);
  router.get('/api/getconference', controller.whjconference.index);
  router.post('/api/addconference', controller.whjconference.create);
  router.delete('/api/delconference/:id', controller.whjconference.destroy); // 删除
  router.get('/api/getshangpin', controller.whjshangpin.index);
  router.delete('/api/delshangpin/:id', controller.whjshangpin.destroy); // 删除
  router.put('/api/upconference/:id', controller.whjconference.update);
  router.get('/api/getlunbo', controller.whjlunbo.index);
  router.delete('/api/dellunbo/:id', controller.whjlunbo.destroy); // 删除
  // 活动管理


  router.get('/api/grouping', controller.zhtgrouping.index);
  router.post('/api/addgrouping', controller.zhtgrouping.create);
  router.delete('/api/grouping/:id', controller.zhtgrouping.destroy);
  router.get('/api/hdvenue', controller.zhtHdVenue.index);
  router.post('/api/addvenue', controller.zhtHdVenue.create);
  router.delete('/api/delvenue/:id', controller.zhtHdVenue.destroy);
  router.get('/api/searchvenve/:id', controller.zhtHdVenue.show);
  router.put('/api/putvenue/:id', controller.zhtHdVenue.update);
  router.get('/api/getgoods', controller.zhtHdGoods.index);
  router.get('/api/getGoodsclass', controller.zhtHdClass.index);
  router.post('/api/addGoodsClass', controller.zhtHdClass.create);
  router.delete('/api/delGoodsClass/:id', controller.zhtHdClass.destroy);
  router.get('/api/searchGoodsClass/:id', controller.zhtHdClass.show);
  router.put('/api/putGoodsCasss/:id', controller.zhtHdClass.update);
  router.post('/api/addHdGoods', controller.zhtHdGoods.create);
  router.delete('/api/delGoods/:id', controller.zhtHdGoods.destroy);
  router.put('/api/putgoods/:id', controller.zhtHdGoods.update);
  router.get('/api/searchGoods/:id', controller.zhtHdGoods.show);
  router.post('/api/addHdBanner', controller.lwzUpload.updatepuSubPic);
  router.post('/api/addBannerList', controller.zhtHdBanner.create);
  router.get('/api/getBannerList', controller.zhtHdBanner.index);
  router.delete('/api/delBanner/:id', controller.zhtHdBanner.destroy);
  router.get('/api/searchBanner/:id', controller.zhtHdBanner.show);
  router.put('/api/putBanner/:id', controller.zhtHdBanner.update);
  // router.get('/api/getPtGoodsAll', controller.zhtPtGoods.index);
  router.post('/api/addPtGoodsAll', controller.zhtPtGoodsAll.create);
  router.get('/api/searchPtGood/:id', controller.zhtPtGoods.show);
  router.put('/api/putPtGood/:id', controller.zhtPtGoods.update);
  router.delete('/api/delPtGoods/:id', controller.zhtPtGoods.destroy);
  router.get('/api/getPtClassList', controller.zhtPtClass.index);
  router.post('/api/addPtClasa', controller.zhtPtClass.create);
  router.delete('/api/PtClass/:id', controller.zhtPtClass.destroy);
  router.get('/api/searchPtClass/:id', controller.zhtPtClass.show);
  router.put('/api/putPtClass/:id', controller.zhtPtClass.update);
  router.get('/api/getPtBanner', controller.zhtPtBanner.index);
  router.post('/api/addPtBanner', controller.zhtPtBanner.create);
  router.delete('/api/delPtBanner/:id', controller.zhtPtBanner.destroy);
  router.put('/api/putPtBanner/:id', controller.zhtPtBanner.update);
  router.get('/api/searchPtBanner/:id', controller.zhtPtBanner.show);
  router.get('/api/getJfGoodsLists', controller.zhtJfGoodsList.index);
  router.post('/api/addJfGoods', controller.zhtJfGoodsList.create);
  router.delete('/api/delJfGoods/:id', controller.zhtJfGoodsList.destroy);
  router.put('/api/putJfGoods/:id', controller.zhtJfGoodsList.update);
  router.get('/api/searchJfGoods/:id', controller.zhtJfGoodsList.show);
  router.get('/api/getJfBanner', controller.zhtJfBanner.index);
  router.post('/api/addJfBanner', controller.zhtJfBanner.create);
  router.delete('/api/delJfBanner/:id', controller.zhtJfBanner.destroy);
  router.get('/api/searchJfBanner/:id', controller.zhtJfBanner.show);
  router.put('/api/putJfBanner/:id', controller.zhtJfBanner.update);
  router.get('/api/getJfGoodClass', controller.zhtJfGoodClass.index);
  router.post('/api/addJfGoodClass', controller.zhtJfGoodClass.create);
  router.get('/api/searchJFGoodClass/:id', controller.zhtJfGoodClass.show);
  router.put('/api/putJfGoodClass/:id', controller.zhtJfGoodClass.update);
  router.delete('/api/delJfGoodClass/:id', controller.zhtJfGoodClass.destroy);
  router.get('/api/getJfGoodState', controller.zhtJfGoodsState.index);
  router.get('/api/searchJfGoodState/:id', controller.zhtJfGoodsState.show);
  router.put('/api/putJfGoodsState/:id', controller.zhtJfGoodsState.update);
  router.get('/api/getGoodsAll', controller.zhtGoodsAll.index);

  router.get('/api/getshang', controller.whjshang.index);

  router.delete('/api/delshang/:id', controller.whjshang.destroy);
  router.post('/api/addshang', controller.whjshang.create);
  router.put('/api/upshang/:id', controller.whjshang.update);


  // router.get('/api/getWYLuser', controller.user.index);

  // router.post('/api/addWYLuser', controller.user.create) // 创建
  // router.delete('/api/delWYLuser/:id', controller.user.destroy) // 删除
  // router.put('/api/upWYLuser/:id', controller.user.update)
  // router.get('/api/getWYLuser23/:age', controller.user.index) // 查找
};
